<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 训练4
        console.log(`第四题`)
        const add = 50;
        let yaer = 1;
        let salary = 3000;
        do {
            salary += add;
            yaer++;
        } while (yaer <= 5);
        console.log(`工资为${salary}`)
        // 训练5
        console.log(`第五题`);
        for (let i = 0; i <= 35; i++) {
            const rabbit = 35 - i;   
            if (2 * i + 4 * rabbit === 94) {
                console.log(`鸡的数量：${i} 只`);
                console.log(`兔的数量：${rabbit} 只`);
                break; 
        }
    }
    </script>
</body>

</html>